
public class Available implements ItemState
{
	private Item item;
	public Available(Item i)
	{
		item=i;
	}
	@Override
	public boolean processIncoming()
	{
		//System.out.println("Item already available.");
		return false;
	}

	@Override
	public boolean processOutgoing(CustomerAccount c)
	{
		c.addToCart(item);
		//System.out.println("Item sucessfully processed(Outgoing).");
		item.setState(item.getNotAvailableState());
		return true;
	}

}
